-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force outlining for array EA API #21063
Conversation
jenkins compile all jdk21 |
115daa0
to
8659ab3
Compare
jenkins compile all jdk21 |
8659ab3
to
244e64e
Compare
jenkins compile all jdk8 |
244e64e
to
9f7becc
Compare
please review: @dmitripivkine @TobiAjila @gacholio |
The re-write is intentionally contained within 64bit and API that uses vmThread. If there are no negative side effects 32bit and javaVM APIs will be rewritten, too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good. My only concern is that VMINLINE
may not be as strong a guarantee of inlining as a macro in all compilers. I guess we will find out pretty soon.
jenkins test sanity,extended.functional alinux64 jdk17 |
Some failures
|
9f7becc
to
7131b4c
Compare
suspecting on index being passed as an expression at some spots - added oval brackets at macro expansion |
jenkins test sanity,extended.functional alinux64 jdk17 |
still failing - looking |
907e5fd
to
3f393ca
Compare
jenkins test sanity,extended.functional alinux64 jdk17 |
Seems like Unsafe code intentionally deals with index as UDATA, so it was incorrect to cast index down to U_32 at the top level API. Still doing it just for index recalculation for discontiguous arrays, for speed reasons (it does actually make a difference and it's also what original macro was doing). |
Macros for Array Effective Address calculations are inherently inlined and seem to create much pressure either on register or code cash in Bytecode interpreter. They are rewritten in C and forced to be outlined specifically for GNU compilers on X and Z, where we saw regression when Offheap was introduced (what made the macros more complex, creating even more pressure). For other platforms where we did not see regression, we continue to inline (ATM unknown if outlining would have negative or possitive effect). Hence we still keep it in a header (*.h) file. Signed-off-by: Aleksandar Micic <[email protected]>
3f393ca
to
a872cbd
Compare
jenkins test sanity,extended.functional alinux64 jdk17 |
jenkins compile all jdk8 |
Macros for Array Effective Address calculations are inherently inlined
and seem to create much pressure either on register or code cash in
Bytecode interpreter.
They are rewritten in C and forced to be outlined specifically for GNU
compilers on X and Z, where we saw regression when Offheap was
introduced (what made the macros more complex, creating even more
pressure).
For other platforms where we did not see regression, we continue to
inline (ATM unknown if outlining would have negative or possitive
effect). Hence we still keep it in a header (*.h) file.